Systems and methods for avoiding inadvertently triggering a voice assistant

ABSTRACT

Systems and methods are provided herein for avoiding inadvertently trigging a voice assistant with audio played through a speaker. An audio signal is captured by sampling a microphone of the voice assistant at a sampling frequency that is higher than an expected finite sampling frequency of previously recorded audio played through the speaker to generate a voice data sample. A quality metric of the generated voice data sample is calculated by determining whether the generated voice data sample comprises artifacts resulting from previous compression or approximation by the expected finite sampling frequency. Based on the calculated quality metric, it is determined whether the captured audio signal is previously recorded audio played through the speaker. Responsive to the determination that the captured audio signal is previously recorded audio played through the speaker, the voice assistant refrains from being activated.

BACKGROUND

The present disclosure is directed to systems and methods fordistinguishing between audio generated directly by human voice andpreviously recorded audio played through a speaker. In particular,systems and methods are provided for avoiding inadvertently triggering avoice assistant with previously recorded audio played through a speakerby using high-frequency sampling.

SUMMARY

Voice recognition systems often need to differentiate between real voiceinput and noise or extraneous signals. This problem is particularlydifficult when the extraneous signal is previously recorded voice (e.g.,voice being played through a speaker). Because voice being playedthrough a speaker is similar to human voice, voice recognition systemsmay often confuse such noise with a real signal, leading to undesirableresults. For example, an unnecessary command may be performed, or accessmay be improperly granted to a secure system.

This problem is particularly relevant to voice assistant systems. Voiceassistants (e.g., voice-activated devices) rely on “always on” listeningto trigger functions associated with the voice assistant. In someimplementations, to perform a function associated with the voiceassistant, a user must speak a specific trigger word or phrase (e.g., akeyword) that is used to prepare the voice assistant for performance ofa function associated with a voice command following the keyword. Forexample, a voice assistant may be triggered by stating the name of thevoice assistant (e.g., “Alexa”) or by stating a phrase (e.g., “Oksmartphone”). However, the keyword may also be a word that is output bya speaker (e.g., of a TV, radio, smartphone, etc.) in the vicinity ofthe voice assistant. For example, the keyword may be included in mediacontent (e.g., a song, a TV program, a radio program, broadcast content,etc.) being played by the speaker. Accordingly, if the voice assistantdetects the keyword output by the speaker, the voice assistant may beinadvertently triggered. Inadvertent triggering has many negativeconsequences. Performance of undesired commands may range frominconvenient (e.g., music being turned on when a user does not wish tohear it), to costly (e.g., wrong products or media being purchased), tocatastrophic (e.g., a door being unlocked during an emergency).Inadvertent triggering of the voice assistant may also cause userfrustration because it may interrupt the user, because it may cause theuser to need to perform additional actions to de-trigger the voiceassistant, or because it may result in the voice assistant performingunintentional and erratic functions. Moreover, inadvertent triggeringwill consume system resources (e.g., processor cycles, memory, power,etc.).

To solve these problems, systems and methods are provided herein foravoiding inadvertently trigging a voice assistant with audio playedthrough a speaker due to audio being played by the speaker. Toaccomplish this, the system may rely on known recording standards forrecording audio. For example, current standards typically require audiorecording to be sampled at a finite sampling frequency of 44,100 Hertz(Hz) or 48,000 Hz. Since the expected sampling frequency of a previousrecording is known, an audio signal may be captured by sampling amicrophone of the voice assistant at a sampling frequency that is higherthan an expected finite sampling frequency of the previously recordedaudio played through the speaker to generate a voice data sample. Aquality metric of the generated voice data sample may be calculated bydetermining whether the generated voice data sample comprises artifactsresulting from previous compression or approximation by the expectedfinite sampling frequency. Based on the calculated quality metric, itmay be determined whether the captured audio signal is the previouslyrecorded audio played through the speaker. Responsive to thedetermination that the captured audio signal is the previously recordedaudio played through the speaker, the voice assistant may not beactivated.

In some embodiments, capturing the audio signal by sampling themicrophone of the voice assistant at the sampling frequency that ishigher than the expected finite sampling frequency is performed inresponse to determining that an audio signal captured by sampling themicrophone of the voice assistant at a sampling frequency that is lowerthan the expected finite sampling frequency includes a keyword foractivating the voice assistant.

In some embodiments, the sampling frequency may be at least double theexpected finite sampling frequency. In some embodiments, the samplingfrequency may be greater than 96 kHz. In some embodiments, the expectedfinite sampling frequency may be 44.1 kHz or 48 kHz.

In some embodiments, the captured audio signal may include a keyword foractivating the voice assistant. In some embodiments, calculating thequality metric may include determining whether a slope of the generatedvoice data sample in the time domain crosses zero more than apredetermined number of times in a predetermined time period. In otherembodiments, calculating the quality metric may include converting thegenerated voice data sample from the time domain to the frequency domainusing a Fast Fourier Transform and determining a number ofhigh-frequency signals in the converted voice data sample. In yet otherembodiments, calculating the quality metric may include determining anumber of the artifacts resulting from previous compression orapproximation by the expected finite sampling frequency in a period ofthe generated voice data sample and selecting, from a table having aplurality of quality metrics respectively corresponding to differentnumbers of artifacts in the period, the quality metric corresponding tothe determined number of artifacts in the period.

In some embodiments, determining whether the captured audio signal isthe previously recorded audio played through the speaker may includecomparing the calculated quality metric to a threshold value. In someembodiments, responsive to the determination that the captured audiosignal is not the previously recorded audio played through the speaker,the voice assistant may be activated.

It should be noted that the determination that the captured audio signalis the previously recorded audio played through the speaker can be usedto improve voice recognition in other ways. For example, it may be usedto improve a biometric security system that relies on voice recognition,by preventing a recording of the verified voice being used to bypass thebiometric security system.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects and advantages of the present disclosurewill be apparent upon consideration of the following detaileddescription, taken in conjunction with the accompanying drawings, inwhich like reference characters refer to like parts throughout, and inwhich:

FIG. 1 shows an illustrative diagram of sampling an audio signal, inaccordance with some embodiments of the present disclosure;

FIG. 2 shows an illustrative process for avoiding inadvertentlytriggering a voice assistant with previously recorded audio playedthrough a speaker of another electronic device, in accordance with someembodiments of the present disclosure;

FIG. 3 shows a detailed view of the high-frequency sampled waveform ofFIG. 2, in accordance with some embodiments of the present disclosure;

FIG. 4A shows a detailed view of a portion of the high-frequency sampledwaveform shown in FIG. 2, when the sampled audio is played through aspeaker, in accordance with some embodiments of the present disclosure;

FIG. 4B shows a detailed view of a portion of the high-frequency sampledwaveform shown in FIG. 2, when the sampled audio is spoken directly by auser in the vicinity of the voice assistant, in accordance with someembodiments of the present disclosure;

FIGS. 5-6 describe exemplary devices, systems, servers, and relatedhardware for avoiding inadvertently triggering a voice assistant withaudio played through a speaker, in accordance with some embodiments ofthe present disclosure;

FIG. 7 depicts a flowchart of illustrative steps for avoidinginadvertently triggering a voice assistant with previously recordedaudio played through a speaker, in accordance with some embodiments ofthe present disclosure; and

FIG. 8 depicts a flowchart of illustrative steps for avoidinginadvertently triggering a voice assistant with previously recordedaudio played through a speaker, in accordance with some embodiments ofthe present disclosure.

DETAILED DESCRIPTION

Systems and methods are disclosed herein for avoiding inadvertentlytrigging a voice assistant with audio played through a speaker. Forexample, while conventional systems may trigger the voice assistantmerely based on the presence of a keyword or wake word (e.g., “Alexa”)for activating the voice assistant, the systems and methods describedherein prevent inadvertently activating the voice assistant bydifferentiating between a user speaking the keyword directly to activatethe voice assistant and a speaker in the vicinity of the voice assistantplaying the keyword. To do this, the voice assistant may sample audio ata high frequency (e.g., at a frequency that is higher than an expectedfinite sampling frequency of previously recorded audio played throughthe speaker), and, if the sampled audio includes the keyword to triggerthe voice assistant, the voice assistant may analyze the sampled keywordto determine if the keyword was played through the speaker. For example,the voice assistant may determine if the sampled keyword includesartifacts resulting from previous compression or approximation by theexpected finite sampling frequency (e.g., artifacts generated byprevious recording of the audio). If the voice assistant determines thatthe keyword was played through the speaker, the voice assistant mayignore the keyword and refrain from activating. Otherwise, if the voiceassistant determines that the audio was not played through a speaker(e.g., it was spoken by a user in the vicinity of the voice assistant),the voice assistant may activate to perform a function associated with avoice command following the keyword.

In signal processing, sound (i.e., a continuous-time signal) isconverted to digital audio (a discrete-time signal) by the process ofsampling. The Nyquist-Shannon theorem states that in order to accuratelyreproduce a signal, the signal must be sampled at a sampling frequencythat is greater than twice the maximum frequency of the signal. If alower sampling frequency is used, the signal being sampled may not beaccurately reproduced and may result in audible artifacts known as“aliasing” being included in the reproduced signal.

Although there is considerable variation from person to person, thehuman range of hearing is generally considered to be 20 Hz to 20,000 Hz(i.e., 20 kHz). Accordingly, in order to accurately reproduce audio formedia content, audio is usually sampled at a frequency that is greaterthan twice the upper range of human hearing. For example, audio formedia content is usually sampled at either 44.1 kHz or 48 kHz.

FIG. 1 shows an illustrative diagram 100 of sampling an audio signal (inthe frequency domain), in accordance with some embodiments of thepresent disclosure. As shown, in 102, the spectrum of an analog signalto be sampled may be from −B to B, where B is the maximum frequency ofthe analog signal. According to the Nyquist-Shannon theorem, if theanalog signal is sampled at a sampling frequency (i.e., F_(s)) that isgreater than twice the maximum frequency of the signal (i.e., 2B), thesignal may be accurately reproduced, as shown in 104. As also shown in104, aliases of the sampled signal may appear periodically in thefrequency domain with a frequency shift of n*F_(s).

In contrast, as shown in 106, if the analog signal is sampled at asampling frequency that is less than (or equal to) twice the maximumfrequency of the signal (i.e., B), the signal cannot be accuratelyreproduced, and aliasing within the spectrum of the audio signal mayoccur. Put another way, if the maximum frequency of the signal exceedsthe “Nyquist frequency” (i.e., half the sampling frequency), aliasingmay occur within the spectrum of the audio signal (i.e., within theNyquist frequency).

Oftentimes, to ensure that audible aliasing does not occur, audio ispre-processed by an anti-aliasing filter before sampling the audio tolimit the maximum frequency of the pre-processed signal to be less thanthe Nyquist frequency. However, because anti-aliasing filters are notideal, certain high-frequency portions of the audio that exceed theNyquist frequency may be only substantially attenuated (i.e., notcompletely removed before the audio is sampled). Accordingly, when thesampled audio is played through a speaker, a certain amount ofhigh-frequency “noise” due to aliasing may also be reproduced. Althoughsuch high-frequency noise is not usually detectable by a human ear, itmay be detected by a computer when the reproduced audio is sampled at avery high frequency (e.g., at least twice the original sample rate ofthe previously recorded audio), as described in greater detail below.

FIG. 2 shows an illustrative process for avoiding inadvertentlytriggering a voice assistant 210 with previously recorded audio playedthrough a speaker 207 of another electronic device (e.g., a TV 206), inaccordance with some embodiments of the present disclosure. As describedherein, previously recorded audio may refer to any audio that iscaptured (e.g., through sampling), regardless of whether the capturedaudio is played immediately through the speaker 207 (and not permanentlystored) or stored in a storage before being played through the speaker207. For example, the audio may have been previously sampled andpermanently stored in non-transitory memory at a TV studio before therecorded audio is played by the speaker 207 of the TV 206 after beingbroadcast. In another example, the TV 206 may be showing a livebroadcast where recorded audio is stored in transitory memory only whilebeing broadcast to the TV 206. Additionally, audio played through thespeaker 207 in the vicinity of the voice assistant 210 may refer to anyaudio that is played by a speaker and detected by the voice assistant210. As shown, a user 202 may be watching, for example, a news program204 on a TV 206. The news program 204 may include a weather segmenthosted by a forecaster named “Alexa.” Thus, to introduce the weathersegment, the host of the news program 204 may say “Alexa, what's theweather?” 208. The audio 208 may be played through the speaker 207 ofthe TV 206 and captured by a microphone 211 of the voice assistant 210in the vicinity of the speaker 207 of the TV 206. The keyword foractivating the voice assistant 210 may also be “Alexa.”

The voice assistant 210 may implement “always on” listening to detect akeyword for activating the voice assistant 210. During the “always on”listening, the voice assistant 210 may use high-frequency sampling 212to capture audio. That is, the voice assistant 210 may sample themicrophone 211 of the voice assistant 210 at a sampling frequency thatis higher than an expected (finite) sampling frequency used to captureaudio played through a speaker (e.g., the speaker 207 of the TV 206). Insome embodiments, the sampling frequency is greater than at least twicethe expected sampling frequency used to capture the audio.

As described above, most audio for multimedia content is sampled ateither 44.1 kHz or 48 kHz. Other audio content (e.g., certain phoneconversations) may be sampled as low as 8 kHz. Also, certain voiceassistants may sample human speech at 16 kHz. Thus, in some embodiments,the high-frequency sampling 212 used by the voice assistant 210 may begreater than twice the highest expected sampling frequency (e.g., 48kHz) used to capture audio played through the speaker 207. That is, thehigh-frequency sampling 212 may use a sampling frequency greater than 96kHz. For example, as described in greater detail with reference to FIG.3, during the “always on” listening, the voice assistant 210 may samplethe microphone 211 at 96.1 kHz to generate the waveform 214. However,this is only one example, and the high-frequency sampling 212 used bythe voice assistant 210 may be any frequency greater than 96 kHz (e.g.,100 kHz, 176.4 kHz, 192 kHz, 352.8 kHz, etc.) or any frequency greaterthan two times higher than an expected (finite) sampling frequency usedto capture audio played through the speaker 207. For example, thehighest expected sampling frequency may be higher than 48 kHz.

As shown, during the “always on” listening, the voice assistant 210generates (captures) the high-frequency sampled waveform 214 by samplingthe microphone 211 with the high-frequency sampling 212 while the audio208 is played through the speaker 207 of the TV 206. Although only thefirst part of the audio 208 (i.e., corresponding to the keyword “Alexa”)is shown in the waveform 214, the voice assistant 210 may capture theentire audio 208 using the high-frequency sampling 212. In someembodiments, in order to reduce the amount of data required to beprocessed, the voice assistant 210 may use the high-frequency sampling212 only until the keyword (e.g., “Alexa”) to activate the voiceassistant 210 is detected. In some embodiments, the voice assistant 210may use the high-frequency sampling 212 until the voice assistant 210determines that the keyword is spoken by a user (i.e., not playedthrough a speaker), before switching to lower-frequency sampling for theremainder of the conversation with the user. In some embodiments, thevoice assistant 210 may always use the high-frequency sampling 212. Insome embodiments, the voice assistant 210 may use low-frequency samplinguntil the voice assistant 210 detects the keyword, before switching tothe high-frequency sampling 212 to analyze the audio after the keywordto determine if the audio after the keyword is played through a speaker.However, these are only examples, and the voice assistant 210 may usethe high-frequency sampling 212 on any portion of the audio captured bythe microphone 211 of the voice assistant 210.

FIG. 3 shows a detailed view of the high-frequency sampled waveform 214of FIG. 2, in accordance with some embodiments of the presentdisclosure. In some embodiments, as detailed above, the microphone 211of the voice assistant 210 may be sampled at 96.1 kHz. Thus, theillustrated portion of the high-frequency sampled waveform 214, whichincludes over 90,000 individual samples of audio corresponding to theword “Alexa,” is around 1 second long. As shown, the high-frequencysampled waveform 214 is in the time domain. The voice assistant 210 mayanalyze the high-frequency sampled waveform 214 to determine if thehigh-frequency sampled waveform 214 corresponds to the keyword (e.g.,“Alexa”). In response to determining that the high-frequency sampledwaveform 214 does correspond to the keyword, the voice assistant 210 maydetermine if the high-frequency sampled waveform 214 corresponds toaudio played through a speaker or audio spoken directly by a user in thevicinity of the voice assistant 210.

Returning to FIG. 2, at 216, the voice assistant 210 may calculate aquality metric of the high-frequency sampled waveform 214 by determiningwhether the high-frequency sampled waveform 214 includes artifactsresulting from previous compression or approximation by an expectedfinite sampling frequency. To do this, in some embodiments, the voiceassistant 210 may analyze a portion of the high-frequency sampledwaveform 214. For example, the voice assistant 210 may analyze theportion 302 of the high-frequency sampled waveform 214 shown in FIG. 2.In some embodiments, the voice assistant 210 may analyze multipleportions of the high-frequency sampled waveform 214 or the entirehigh-frequency sampled waveform 214.

FIG. 4A shows a detailed view of the portion 302 of the high-frequencysampled waveform 214 shown in FIG. 2, when the sampled audio is playedthrough a speaker, in accordance with some embodiments of the presentdisclosure. As shown, the portion 302 includes the samples from between(and including) sample 28,800 and sample 29,400 of the high-frequencysampled waveform 214. However, this is only one example, and the portion302 may include any number of the samples of the high-frequency sampledwaveform 214. The voice assistant 210 may analyze the portion 302 todetermine if there are any artifacts resulting from previous compressionor approximation by an expected finite sampling frequency. That is, thevoice assistant 210 may analyze the portion 302 to determine if thereare any artifacts indicating that the audio is digital audio playedthrough a speaker. For example, a portion 402 between (and including)sample 28,800 to sample 29,200 (of the portion 302) shows severalartifacts (e.g., 402 a-402 u) indicating that the audio is digital audioplayed through a speaker. As shown, in the time domain, the artifacts402 a-402 u may appear as ripples in an otherwise smooth waveform.

The voice assistant 210 may detect the artifacts 402 a-402 u using avariety of methods. In some embodiments, the voice assistant 210 mayapply a discrete differential function to the portion 302 (or portion402 within the portion 302) and examine how many times the slope of theportion 302 crosses zero. If a discrete differential function is used,it may be advantageous to select certain portions of the high-frequencysampled waveform where the amplitude of the samples does not change tooquickly (e.g., the portion 402). In some embodiments, the voiceassistant 210 may compare the amplitudes of successive samples to detectthe artifacts 402 a-402 u. For example, the voice assistant 210 maydetermine the amplitudes increase and then decrease (or visa-versa)within a certain number of samples to identify ripples in an otherwisesmooth waveform.

In some embodiments, the voice assistant 210 may first convert thehigh-frequency sampled waveform 214 (or the portion 402) from the timedomain to the frequency domain (e.g., applying techniques such as a FastFourier Transform). The voice assistant 210 may then analyze thetransformed waveform to determine if any high-frequency components(e.g., noise components) correspond to artifacts (e.g., the artifacts402 a-402 u) indicating that the audio is digital audio played through aspeaker. For example, the voice assistant 210 may analyze thetransformed waveform above a certain frequency (e.g., 20 kHz) whereartifacts resulting from previous compression or approximation by anexpected finite sampling frequency are expected to exist.

The voice assistant 210 may calculate the quality metric of thehigh-frequency sampled waveform 214 based on the detected artifacts 402a-402 u. The quality metric may indicate the likelihood that thehigh-frequency sampled waveform 214 corresponds to audio played througha speaker (i.e., and not spoken directly by a user in the vicinity ofthe voice assistant 210). In some embodiments, the quality metric may beassigned to a value on a scale (e.g., 1 to 10) with the lowest value(e.g., 1) indicating that the high-frequency sampled waveform 214corresponds to audio spoken directly by a user in the vicinity of thevoice assistant 210 and the highest value (e.g., 10) indicating that thehigh-frequency sampled waveform 214 corresponds to audio played througha speaker. For example, the voice assistant 210 may determine the numberof the detected artifacts 402 a-402 u (e.g., 21) in a certain period(e.g., 400 samples at a sample rate of 96.1 kHz). The voice assistant210 may access a table of a plurality of quality metrics, eachcorresponding to a different number of artifacts/period, and select aquality metric corresponding to the detected number of artifacts in acertain period. For example, the voice assistant 210 may access Table 1(shown below).

TABLE 1 Number of Artifacts Quality Metric (per 400 Samples (96.1 kHz))1  0 2  3 3  6 4  9 5 12 6 15 7 18 8 21 9 24 10  27+

For convenience, Table 1 shows the correspondence between a plurality ofquality metrics and the different number of artifacts per 400 samples(at 96.1 kHz). However, in order to allow Table 1 to be used fordifferent sampling frequencies and sample sizes, the “Number ofArtifacts” in Table 1 may be expressed as a rate of artifacts persecond. For example, 21 artifacts in a period of 400 samples at a samplerate of 96.1 kHz corresponds to a rate of 5045 artifacts per second. Ifthe number of artifacts in a sample is between the numbers provided inTable 1, linear interpolation may be used to calculate a quality metric.

Referring to Table 1, the voice assistant 210 may determine that 21artifacts in the period of 400 samples (at a sample rate of 96.1 kHz)corresponds to a quality metric of 8, which signifies that it is verylikely that the high-frequency sampled waveform 214 corresponds to audioplayed through a speaker. However, this is only one example, and anyquality metric indicating the likelihood that the high-frequency sampledwaveform 214 corresponds to audio played through a speaker may be used.

FIG. 4B shows a detailed view of the portion 302′ of the high-frequencysampled waveform 214 shown in FIG. 2, when the sampled audio is spokendirectly by a user (e.g., user 202) in the vicinity of the voiceassistant 210, in accordance with some embodiments of the presentdisclosure. As shown, the portion 302′ also includes the samples between(and including) sample 28,800 to sample 29,400 of the high-frequencysampled waveform 214. As similarly described above with reference toFIG. 4A, the voice assistant 210 may analyze the portion 302′ todetermine if there are any artifacts resulting from previous compressionor approximation by an expected finite sampling frequency. That is, thevoice assistant 210 may analyze the portion 302′ to determine if thereare any artifacts indicating that the audio is digital audio playedthrough a speaker. For example, a portion 404 between (and including)sample 28,800 to sample 29,200 (of the portion 302′) shows only threepossible artifacts (e.g., 404 a-404 c). However, in contrast to FIG. 4A,the possible artifacts 404 a-404 c do not appear as ripples in anotherwise smooth waveform. Instead, the possible artifacts 404 a-404 chave a smoother appearance than the ripples 402 a-402 u illustrated inFIG. 4A. However, depending on how artifacts are detected (e.g., byapplying a discrete differential function), the possible artifacts 404a-404 c may be incorrectly identified as artifacts.

As similarly described above with reference to FIG. 4A, the voiceassistant 210 may calculate the quality metrics of the high-frequencysampled waveform 214 based on the detected artifacts 404 a-404 c. Forexample, using Table 1, the voice assistant 210 may determine that 3artifacts in the period of 400 samples (at a sample rate of 96.1 kHz)corresponds to a quality metric of 2, which signifies that it is verylikely that the high-frequency sampled waveform 214 corresponds to audiospoken directly by a user (e.g., user 202) in the vicinity of the voiceassistant 210.

Returning to FIG. 2, at 218, the voice assistant 210 may determine,based on the determined quality metric, whether the high-frequencysampled waveform 214 corresponds to previously recorded audio playedthrough a speaker or audio spoken directly by a user in the vicinity ofthe voice assistant 210. For example, the voice assistant 210 maycompare the determined quality metric to a threshold value. Thethreshold value may, for example, correspond to the quality metric scalediscussed above with reference to FIGS. 4A and 4B. If the determinedquality metric is greater than the threshold value, the voice assistant210 may determine that the high-frequency sampled waveform 214corresponds to previously recorded audio played through a speaker. Insome embodiments, the threshold value may be set in advance (e.g., thethreshold value may be set to 5). In some embodiments, the thresholdvalue may be set by a user or automatically adjusted based on feedbackfrom a user. A lower threshold value may increase the likelihood thatthe voice assistant 210 determines that the high-frequency sampledwaveform 214 corresponds to previously recorded audio played through aspeaker. Similarly, a higher threshold value may decrease the likelihoodthat the voice assistant determines that the high-frequency sampledwaveform 214 corresponds to previously recorded audio played through aspeaker.

With reference to FIG. 4A, the voice assistant 210 may compare thequality metric of the portion 302 (i.e., 8) with the threshold value(e.g., 5). Based on the comparison, the voice assistant 210 maydetermine that the high-frequency sampled waveform 214 corresponds topreviously recorded audio played through a speaker. Thus, at 220, thevoice assistant 210 may refrain from activating.

With reference to FIG. 4B, the voice assistant 210 may compare thequality metric of the portion 302′ (i.e., 2) with the threshold value(e.g., 5). Based on the comparison, the voice assistant 210 maydetermine that the high-frequency sampled waveform 214 does notcorrespond to previously recorded audio played through a speaker. Thatis, the voice assistant 210 may determine that the high-frequencysampled waveform 214 is spoken directly by a user (e.g., user 202) inthe vicinity of the voice assistant 210. Thus, at 222, the voiceassistant 210 may activate.

FIGS. 5-6 describe exemplary devices, systems, servers, and relatedhardware for avoiding inadvertently triggering a voice assistant withaudio played through a speaker, in accordance with some embodiments ofthe present disclosure. FIG. 5 shows a generalized embodiment of a userequipment device 500, in accordance with one embodiment. The userequipment device 500 may be a more detailed version of the voiceassistant 210 or the other, more specific implementations of the devicesdiscussed below in connection with FIG. 6.

The user equipment device 500 may receive content and data viainput/output (I/O) path 502. The I/O path 502 may provide audio content(e.g., broadcast programming, on-demand programming, Internet content,content available over a local area network (LAN) or wide area network(WAN), and/or other content) and data to control circuitry 504, whichincludes processing circuitry 506 and a storage 508. The controlcircuitry 504 may be used to send and receive commands, requests, andother suitable data using the I/O path 502. The I/O path 502 may connectthe control circuitry 504 (and specifically the processing circuitry506) to one or more communications paths (described below). The I/O path502 may include circuitry (e.g., input circuitry) including, forexample, an analog to digital converter to receive audio signals throughthe microphone 516, a wired network port, a wireless network port, orany other circuitry suitably configured to perform I/O functions. I/Ofunctions may be provided by one or more of these communications paths,but are shown as a single path in FIG. 5 to avoid overcomplicating thedrawing.

The control circuitry 504 may be based on any suitable processingcircuitry such as the processing circuitry 506. As referred to herein,processing circuitry should be understood to mean circuitry based on oneor more microprocessors, microcontrollers, digital signal processors,programmable logic devices, field-programmable gate arrays (FPGAs),application-specific integrated circuits (ASICs), etc., and may includea multi-core processor (e.g., dual-core, quad-core, hexa-core, or anysuitable number of cores) or supercomputer. In some embodiments,processing circuitry may be distributed across multiple separateprocessors or processing units, for example, multiple of the same typeof processing units (e.g., two Intel Core i7 processors) or multipledifferent processors (e.g., an Intel Core i5 processor and an Intel Corei7 processor). In some embodiments, the control circuitry 504 executesinstructions for a voice assistant application stored in memory (i.e.,the storage 508). Specifically, the control circuitry 504 may beinstructed by the voice assistant application to perform the functionsdiscussed above and below. For example, the voice assistant applicationmay provide instructions to the control circuitry 504 to process andinterpret voice commands received from a microphone 516, to determine ifthe voice commands were played by a speaker, and to respond voicecommands determined not to be played by the speaker such as by, forexample, transmitting the commands to a central server or retrievinginformation from the Internet, both of these being sent over the I/Opath 502. In some implementations, any action performed by the controlcircuitry 504 may be based on instructions received from the voiceassistant application.

In client-server based embodiments, the control circuitry 504 mayinclude communications circuitry suitable for communicating with a voiceassistant server or other networks or servers. The instructions forcarrying out the above-mentioned functionality may be stored on thevoice assistant server. Communications circuitry may include a cablemodem, an integrated services digital network (ISDN) modem, a digitalsubscriber line (DSL) modem, a telephone modem, an Ethernet card, or awireless modem for communications with other equipment, or any othersuitable communications circuitry. Such communications may involve theInternet or any other suitable communications networks or paths. Inaddition, communications circuitry may include circuitry that enablespeer-to-peer communication of user equipment devices, or communicationof user equipment devices in locations remote from each other (describedin more detail below).

Memory may be an electronic storage device provided as the storage 508that is part of the control circuitry 504. As referred to herein, thephrase “electronic storage device” or “storage device” should beunderstood to mean any device for storing electronic data, computersoftware, or firmware, such as random-access memory, read-only memory,hard drives, optical drives, digital video recorders (DVRs, sometimescalled personal video recorders, or PVRs), solid-state devices, quantumstorage devices, gaming consoles, gaming media, or any other suitablefixed or removable storage devices, and/or any combination of the same.The storage 508 may be used to store various types of content describedherein. Nonvolatile memory may also be used (e.g., to launch a boot-uproutine and other instructions). Cloud-based storage, described inrelation to FIG. 6, may be used to supplement the storage 508 or insteadof the storage 508.

The control circuitry 504 may include audio-generating circuitry andtuning circuitry, such as one or more analog tuners, audio-generationcircuitry, filters or any other suitable tuning or audio circuits orcombinations of such circuits. The control circuitry 504 may alsoinclude scaler circuitry for upconverting and downconverting contentinto the preferred output format of the user equipment device 500. Thecontrol circuitry 504 may also include digital-to-analog convertercircuitry and analog-to-digital converter circuitry for convertingbetween digital and analog signals. The tuning and encoding circuitrymay be used by the user equipment device 500 to receive and to display,to play, or to record content. The circuitry described herein,including, for example, the tuning, audio-generating, encoding,decoding, encrypting, decrypting, scaler, and analog/digital circuitry,may be implemented using software running on one or more general purposeor specialized processors. If the storage 508 is provided as a separatedevice from the user equipment device 500, the tuning and encodingcircuitry (including multiple tuners) may be associated with the storage508.

The microphone 516 may be any microphone (or microphones) capable ofbeing sampled using the high-frequency sampling 212 to detect audio(e.g., human speech and audio played through a speaker). The microphone516 is connected to the processing circuitry 506 to transmit detectedaudio (or speech) for processing.

The user equipment device 500 may optionally include an interface 510.The interface 510 may be any suitable user interface, such as a remotecontrol, mouse, trackball, keypad, keyboard, touchscreen, touchpad,stylus input, joystick, or other user input interfaces. A display 512may be provided as a stand-alone device or integrated with otherelements of the user equipment device 500. For example, the display 512may be a touchscreen or touch-sensitive display. In such circumstances,the interface 510 may be integrated with or combined with the microphone516. When the interface 510 is configured with a screen, such a screenmay be one or more of a monitor, a television, a liquid crystal display(LCD) for a mobile device, active matrix display, cathode ray tubedisplay, light-emitting diode display, organic light-emitting diodedisplay, quantum dot display, or any other suitable equipment fordisplaying visual images. In some embodiments, the interface 510 may beHDTV-capable. In some embodiments, the display 512 may be a 3D display.

The interface 510 may, for example, display a menu for adjusting thethreshold value used to determine whether the high-frequency sampledwaveform 214 corresponds to previously recorded audio played through aspeaker.

The speaker (or speakers) 514 may be provided as integrated with otherelements of user equipment device 500 or may be a stand-alone unit. Thespeaker 514 is connected to the processing circuitry 506 to emit verbalresponses to voice queries by a user (e.g., user 202 of FIG. 2). Morespecifically, voice queries from the user (e.g., user 202 of FIG. 2) aredetected by the microphone 516, and if they are determined not to beplayed through a speaker, are transmitted to the processing circuitry506, where they are translated into commands according to voiceassistant software stored in the storage 506. The software formulates aquery corresponding to the commands and transmits this query to, forexample, a search engine or other Internet resource over the I/O path502. Any resulting answer is received over the same path 502, convertedto an audio signal by the processing circuitry 506, and emitted by thespeaker 514 as an answer to the voice command uttered by the user 202.

The user equipment device 500 of FIG. 5 can be implemented in system 600of FIG. 6 as user television equipment 602, user computer equipment 604,a wireless user communications device 606, or any other type of userequipment suitable for conducting an electronic search and providingresults thereof. For example, the user equipment device 500 may beincorporated into the TV 206, i.e., the user television equipment 602.User equipment devices may be part of a network of devices. Variousnetwork configurations of devices may be implemented and are discussedin more detail below.

In the system 600, there are typically more than one of each type ofuser equipment device, but only one of each is shown in FIG. 6 to avoidovercomplicating the drawing. In addition, a user may utilize more thanone type of user equipment device and more than one of each type of userequipment device.

The user equipment devices may be coupled to communications network 614.Namely, the user television equipment 602, the user computer equipment604, and the wireless user communications device 606 are coupled to thecommunications network 614 via communications paths 608, 610, and 612,respectively. The communications network 614 may be one or more networksincluding the Internet, a mobile phone network, mobile voice or datanetwork (e.g., a 4G or LTE network), cable network, public switchedtelephone network, or other types of communications network orcombinations of communications networks. The paths 608, 610, and 612 mayseparately or together include one or more communications paths, suchas, a satellite path, a fiber-optic path, a cable path, a path thatsupports Internet communications (e.g., IPTV), free-space connections(e.g., for broadcast or other wireless signals), or any other suitablewired or wireless communications path or combination of such paths. Thepath 612 is drawn with dotted lines to indicate that in the exemplaryembodiment shown in FIG. 6 it is a wireless path, and the paths 608 and610 are drawn as solid lines to indicate they are wired paths (althoughthese paths may be wireless paths, if desired). Communications with theuser equipment devices may be provided by one or more of thesecommunications paths, but are shown as a single path in FIG. 6 to avoidovercomplicating the drawing.

Although communications paths are not drawn between user equipmentdevices, these devices may communicate directly with each other viacommunication paths, such as those described above in connection withthe paths 608, 610, and 612, as well as other short-range point-to-pointcommunication paths, such as USB cables, IEEE 1394 cables, wirelesspaths (e.g., Bluetooth, infrared, IEEE 802-11x, etc.), or othershort-range communication via wired or wireless paths. BLUETOOTH is acertification mark owned by Bluetooth SIG, INC. The user equipmentdevices may also communicate with each other directly through anindirect path via the communications network 614.

The system 600 also includes content source 616, and voice assistantserver 618, which can be coupled to any number of databases providinginformation to the voice assistant 210 in FIG. 2. The content source 616and the voice assistant server 618 may be coupled to the communicationsnetwork 614 via communications paths 620 and 622, respectively. Althoughcommunications paths are not drawn between the content source 616 andthe voice assistant server 618, these devices may communicate directlywith each other via communication paths, such as those described above.The content source 616 represents any computer-accessible source ofcontent, such as a storage for audio content, metadata, or, e.g.,information about prior voice assistant sessions. The voice assistantserver 618 may store and execute various software modules forimplementing the voice assistant functionality of a voice assistant(e.g., voice assistant 210 of FIG. 2). In some configurations, thesemodules may include natural language interface, information retrieval,search, machine learning, and any other modules for implementingfunctions of a voice assistant. Such modules and functions are known.

FIG. 7 depicts a flowchart of illustrative steps for avoidinginadvertently triggering a voice assistant with previously recordedaudio played through a speaker, in accordance with some embodiments ofthe present disclosure. For example, a voice assistant applicationimplementing process 700 may be executed by the control circuitry 504 ofthe user equipment device 500. In some embodiments, instructions forexecuting process 700 may be encoded onto a non-transitory storagemedium (e.g., the storage 508) as a set of instructions to be decodedand executed by processing circuitry (e.g., the processing circuitry506). Processing circuitry may, in turn, provide instructions to othersub-circuits contained within control circuitry 504, such as theencoding, decoding, encrypting, decrypting, scaling, analog/digitalconversion circuitry (e.g., to convert the captured analog signal into adigital signal by sampling), and the like. It should be noted that theprocess 700, or any step thereof, could be performed on, or provided by,any of the devices shown in FIGS. 1 and 5-6.

Process 700 begins at step 702, when the voice assistant application(e.g., via the control circuitry 504) may capture an audio signal bysampling a microphone (e.g., the microphone 516) at a high frequency togenerate a voice data sample. For example, the voice assistantapplication may use a sampling frequency that is higher than an expectedfinite sampling frequency of previously recorded audio played through aspeaker (e.g., a speaker of the user television equipment 602) in thevicinity of the user equipment device.

At step 704, the voice assistant application (e.g., via the controlcircuitry 504) may determine if the generated voice data sample includesa keyword (e.g., “Alexa”) for activating a voice assistant. For example,the control circuitry 504 may analyze the generated voice data samplecorresponding to the audio signal received at the microphone 516 toidentify if the generated voice data sample includes the keyword. If thecontrol circuitry 504 determines that the generated voice data sampledoes not include the keyword (“No” at 704), the process 700 may returnto step 702. Otherwise (“Yes” at 704), the process 700 may proceed tostep 706.

At step 706, the voice assistant application (e.g., via the controlcircuitry 504) may calculate a quality metric of the generated voicedata sample by determining whether the generated voice data sampleincludes artifacts resulting from previous compression or approximation.For example, the control circuitry 504 may determine the number and/orspacing of artifacts included in a certain period of the generated voicedata sample (e.g., the entire generated voice data sample or a portionof the generated voice data sample). The control circuitry 504 mayaccess a table having a plurality of quality metrics, each correspondingto a different ratio of artifacts/period, and select a quality metriccorresponding to the artifacts detected in a certain period.

At step 708, the voice assistant application (e.g., via the controlcircuitry 504) may determine, based on the calculated quality metric, ifthe captured audio signal is previously recorded audio played through aspeaker (e.g., a speaker of the user television equipment 602) in thevicinity of the user equipment device 500. For example, the controlcircuitry 504 may compare the calculated quality metric to a thresholdvalue to determine if the captured audio is previously recorded audioplayed through the speaker or spoken directly by a user (e.g., user 202)in the vicinity of the user equipment device 500. If the controlcircuitry 504 determines that the captured audio signal is previouslyrecorded audio played through the speaker (e.g., “Yes” at 708), theprocess 700 may proceed to step 710 and refrain from activating thevoice assistant. Otherwise, if the control circuitry 504 determines thatthe captured audio is not previously recorded audio played through thespeaker (e.g., “No” at 708), the process 700 may proceed to step 712 andactivate the voice assistant. If the control circuitry 504 refrains fromactivating the voice assistant at step 710, the process may return tostep 702. However, this is only one example, and the process 700 may,e.g., grant or deny access to a biometric security system based on thedecision at step 708, or perform (or not perform) any other functionbased on the determination.

At step 710, the voice assistant application (e.g., via the controlcircuitry 504) may refrain from activating the voice assistant andreturn to step 702. At step 712, the voice assistant application (e.g.,via the control circuitry 504) may activate the voice assistant.

FIG. 8 depicts a flowchart of illustrative steps for avoidinginadvertently triggering a voice assistant with previously recordedaudio played through a speaker, in accordance with some embodiments ofthe present disclosure. For example, a voice assistant applicationimplementing process 800 may be executed by the control circuitry 504 ofthe user equipment device 500. In some embodiments, instructions forexecuting process 800 may be encoded onto a non-transitory storagemedium (e.g., the storage 508) as a set of instructions to be decodedand executed by processing circuitry (e.g., the processing circuitry506). Processing circuitry may, in turn, provide instructions to othersub-circuits contained within control circuitry 504, such as theencoding, decoding, encrypting, decrypting, scaling, analog/digitalconversion circuitry (e.g., to convert the captured analog signal into adigital signal by sampling), and the like. It should be noted that theprocess 800, or any step thereof, could be performed on, or provided by,any of the devices shown in FIGS. 1 and 5-6.

Process 800 begins at step 802, when the voice assistant application(e.g., via the control circuitry 504) may capture a first part of anaudio signal by sampling a microphone (e.g., the microphone 516) at alow frequency to generate a low-frequency voice data sample. Forexample, the voice assistant application may use a sampling frequencythat is sufficient only for capturing the human voice (e.g., 16 kHz). Insome embodiments, the low sampling frequency may be the same as or lowerthan an expected finite sampling frequency of previously recorded audioplayed through the speaker (e.g., a speaker of the user televisionequipment 602) in the vicinity of the user equipment device.

At step 804, the voice assistant application (e.g., via the controlcircuitry 504) may determine if the generated low-frequency voice datasample includes a keyword (e.g., “Alexa”) for activating a voiceassistant. For example, the control circuitry 504 may analyze thegenerated voice data sample corresponding to the first part of the audiosignal received at the microphone 516 to identify if the generated voicedata sample includes the keyword. If the control circuitry 504determines that the generated voice data sample does not include thekeyword (“No” at 804), the process 800 may return to step 802.Otherwise, (“Yes” at 804), the process 800 may proceed to step 806.

At step 806, the voice assistant application (e.g., via the controlcircuitry 504) may capture a second part of the audio signal by samplingthe microphone 516 at a high frequency to generate a high-frequencyvoice data sample. For example, when the first part of the audio signalincludes the keyword (e.g., “Alexa”), the second part of the audiosignal may be the voice command following the keyword (e.g., “what's theweather?”). The voice assistant application may use the high-frequencysampling discussed above in step 702 of FIG. 7.

At step 808, the voice assistant application (e.g., via the controlcircuitry 504) may analyze the generated high-frequency signal todetermine if the captured second portion of the audio signal ispreviously recorded audio played through a speaker. To do this, thevoice assistant application may use the processing discussed above insteps 706 and 708 of FIG. 7. Based on the determination, the voiceassistant application may either activate the voice assistant or refrainfrom activating the voice assistant (and return to the start of theprocess 800), as discussed above in steps 710 and 712.

It is contemplated that the steps or descriptions FIGS. 7-8 may be usedwith any other embodiment of this disclosure. In addition, thedescriptions described in relation to the algorithms of FIGS. 7-8 may bedone in alternative orders or in parallel to further the purposes ofthis disclosure. For example, conditional statements and logicalevaluations may be performed in any order or in parallel orsimultaneously to reduce lag or increase the speed of the system ormethod. As a further example, in some embodiments, several instances ofa variable may be evaluated in parallel, using multiple logicalprocessor threads, or the algorithm may be enhanced by incorporatingbranch prediction. Furthermore, it should be noted that the processes ofFIGS. 7-8 may be implemented on a combination of appropriatelyconfigured software and hardware, and that any of the devices orequipment discussed in relation to FIGS. 1 and 5-6 could be used toimplement one or more portions of the process.

The processes discussed above are intended to be illustrative and notlimiting. One skilled in the art would appreciate that the steps of theprocesses discussed herein may be omitted, modified, combined and/orrearranged, and any additional steps may be performed without departingfrom the scope of the invention. More generally, the above disclosure ismeant to be exemplary and not limiting. Only the claims that follow aremeant to set bounds as to what the present invention includes.Furthermore, it should be noted that the features and limitationsdescribed in any one embodiment may be applied to any other embodimentherein, and flowcharts or examples relating to one embodiment may becombined with any other embodiment in a suitable manner, done indifferent orders, or done in parallel. In addition, the systems andmethods described herein may be performed in real time. It should alsobe noted that the systems and/or methods described above may be appliedto, or used in accordance with, other systems and/or methods.

1. A method for avoiding inadvertently triggering a voice assistant withpreviously recorded audio played through a speaker, the methodcomprising: capturing an audio signal by sampling a microphone of thevoice assistant at a sampling frequency that is higher than an expectedfinite sampling frequency of the previously recorded audio playedthrough the speaker to generate a voice data sample; calculating aquality metric of the generated voice data sample by determining whetherthe generated voice data sample comprises artifacts resulting fromprevious compression or approximation by the expected finite samplingfrequency; determining, based on the calculated quality metric, whetherthe captured audio signal is the previously recorded audio playedthrough the speaker; and in response to determining that the capturedaudio signal is the previously recorded audio played through thespeaker, refraining from activating the voice assistant.
 2. The methodof claim 1, wherein the capturing the audio signal by sampling themicrophone of the voice assistant at the sampling frequency that ishigher than the expected finite sampling frequency is performed inresponse to determining that an audio signal captured by sampling themicrophone of the voice assistant at a sampling frequency that is lowerthan the expected finite sampling frequency includes a keyword foractivating the voice assistant.
 3. The method of claim 1, wherein thesampling frequency is at least double the expected finite samplingfrequency.
 4. The method of claim 3, wherein the sampling frequency isgreater than 96 kHz, and wherein the expected finite sampling frequencyis 44.1 kHz or 48 kHz.
 5. The method of claim 1, wherein the capturedaudio signal includes a keyword for activating the voice assistant. 6.The method of claim 1, wherein the calculating the quality metriccomprises determining whether a slope of the generated voice data samplein the time domain crosses zero more than a predetermined number oftimes in a predetermined time period.
 7. The method of claim 1, whereinthe calculating the quality metric comprises converting the generatedvoice data sample from the time domain to the frequency domain using aFast Fourier Transform and determining a number of high-frequencysignals in the converted voice data sample.
 8. The method of claim 1,wherein the calculating the quality metric comprises determining anumber of the artifacts resulting from previous compression orapproximation by the expected finite sampling frequency in a period ofthe generated voice data sample and selecting, from a table having aplurality of quality metrics respectively corresponding to differentnumbers of artifacts in the period, the quality metric corresponding tothe determined number of artifacts in the period.
 9. The method of claim1, wherein the determining whether the captured audio signal is thepreviously recorded audio played through the speaker comprises comparingthe calculated quality metric to a threshold value.
 10. The method ofclaim 1, further comprising in response to determining that the capturedaudio signal is not the previously recorded audio played through thespeaker, activating the voice assistant.
 11. A system for avoidinginadvertently triggering a voice assistant with previously recordedaudio played through a speaker, the system comprising: input circuitryconfigured to: capture an audio signal by sampling a microphone of thevoice assistant at a sampling frequency that is higher than an expectedfinite sampling frequency of the previously recorded audio playedthrough the speaker to generate a voice data sample; and controlcircuitry configured to: calculate a quality metric of the generatedvoice data sample by determining whether the generated voice data samplecomprises artifacts resulting from previous compression or approximationby the expected finite sampling frequency; determine, based on thecalculated quality metric, whether the captured audio signal is thepreviously recorded audio played through the speaker; and in response todetermining that the captured audio signal is the previously recordedaudio played through the speaker, refrain from activating the voiceassistant.
 12. The system of claim 11, wherein the input circuitry isconfigured to capture the audio signal by sampling the microphone of thevoice assistant at the sampling frequency that is higher than theexpected finite in response to determining that an audio signal capturedby sampling the microphone of the voice assistant at a samplingfrequency that is lower than the expected finite sampling frequencyincludes a keyword for activating the voice assistant.
 13. The system ofclaim 11, wherein the sampling frequency is at least double the expectedfinite sampling frequency.
 14. The system of claim 12, wherein thesampling frequency is greater than 96 kHz, and wherein the expectedfinite sampling frequency is 44.1 kHz or 48 kHz.
 15. The system of claim11, wherein the captured audio signal includes a keyword for activatingthe voice assistant.
 16. The system of claim 11, wherein the controlcircuitry is further configured to calculate the quality metric bydetermining whether a slope of the generated voice data sample in thetime domain crosses zero more than a predetermined number of times in apredetermined time period.
 17. The system of claim 11, wherein thecontrol circuitry is further configured to calculate the quality metricby converting the generated voice data sample from the time domain tothe frequency domain using a Fast Fourier Transform and determining anumber of high-frequency signals in the converted voice data sample. 18.The system of claim 11, wherein the control circuitry is furtherconfigured to calculate the quality metric by determining a number ofthe artifacts resulting from previous compression or approximation bythe expected finite sampling frequency in a period of the generatedvoice data sample and selecting, from a table having a plurality ofquality metrics respectively corresponding to different numbers ofartifacts in the period, the quality metric corresponding to thedetermined number of artifacts in the period.
 19. The system of claim11, wherein the control circuitry is further configured to determinewhether the captured audio is the previously recorded audio playedthrough a speaker by comparing the calculated quality metric to athreshold value.
 20. The system of claim 11, wherein the controlcircuitry is further configured, in response to determining that thecaptured audio signal is not the previously recorded audio playedthrough the speaker, to activate the voice assistant. 21-30. (canceled)